import request from '@/utils/request'

// 查询网络配置列表
export function listOutputSet(query) {
  return request({
    url: '/system/outputSet/list',
    method: 'get',
    params: query
  })
}

export function getServiceInfoDataList(data){
  return request({
    url: '/system/outputSet/getServiceInfoDataList',
    method: 'post',
    data: data
  })
}

export function getPrfDataList(data){
  return request({
    url: '/system/outputSet/getPrfDataList',
    method: 'post',
    data: data
  })
}
//点击序号按钮,查询下一个或上一个序号的频道信息
export function getSqlServiceInfoDataList(data){
  return request({
    url: '/system/outputSet/getSqlServiceInfoDataList',
    method: 'post',
    data: data
  })
}
export function setMainFreqEx(data){
  // console.log("setMainFreqEx 请求参数:"+JSON.stringify(data));
  return request({
    url: '/system/outputSet/setMainFreqEx',
    method: 'post',
    data: data
  })
}
export function setPrfDataSave(data){
  // console.log("setPrfDataSave 请求参数:"+JSON.stringify(data));
  return request({
    url: '/system/outputSet/setPrfDataSave',
    method: 'post',
    data: data
  })
}

export function getPrfDataSave(data){
  console.log("getPrfDataSave 请求参数:"+JSON.stringify(data));
  return request({
    url: '/system/outputSet/getPrfDataSave',
    method: 'post',
    data: data
  })
}

export function getOutputPrfData(){
  return request({
    url: '/system/outputSet/getPrfData',
    method: 'get',
  })
}

export function getOutputServiceInfo(data){
  console.log("getOutputServiceInfo 请求参数: "+JSON.stringify(data));
  return request({
    url: '/system/outputSet/getServiceInfo',
    method: 'post',
    data: data
  })
}

export function refushFrequencyGpt(data){
  console.log("refushFrequencyGpt 请求参数: "+JSON.stringify(data));
  return request({
    url: '/system/outputSet/refushFrequencyGpt',
    method: 'post',
    data: data
  })
}
// 查询网络配置详细
export function getNetwork(id) {
  return request({
    url: '/system/channelSearch/' + id,
    method: 'get'
  })
}

// 新增网络配置
export function addNetwork(data) {
  return request({
    url: '/system/channelSearch',
    method: 'post',
    data: data
  })
}

// 修改网络配置
export function updateNetwork(data) {
  return request({
    url: '/system/channelSearch',
    method: 'put',
    data: data
  })
}

// 删除网络配置
export function delNetwork(id) {
  return request({
    url: '/system/channelSearch/' + id,
    method: 'delete'
  })
}

//频道搜索
export function updateChannelForm(data){
  return request({
    url: '/system/channelSearch',
    method: 'put',
    data: data
  })
}

